package com.cloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.cloud.health.CustomHealthIndicator;

@RestController
public class HealthController {
    @Autowired
    CustomHealthIndicator customHealthIndicator;

    @RequestMapping("/up")
    public String up(@RequestParam("up") Boolean up) {
        customHealthIndicator.setUp(up);
        return up.toString();
    }

}
